{% extends "Super.tpl" %}
{% block title %}Java考试系统{% endblock %}
{%block subtitle%}考题管理{%endblock%}
{%block superhref%}manager{%endblock%}
{%block supertitle%}综合管理{%endblock%}
{%block suburl%}manager_student{%endblock%}
{%block rightsubtitle%}学员管理{%endblock%}
{% block content %}
<script type="text/javascript" src="static/js/faq.js"></script>
<style>
	.th {
		text-align: center;
	}
</style>
<div class="container-fluid">
<div class="side-body">
	<div class="card-body" style="position:fixed;z-index:99;left: 20%;width: 60%;">
		<div class="modal-active" id="warning" style="display: none;">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true" id="miniclose">×</span>
						</button>
						<h4 class="modal-title">商品信息</h4>
					</div>
					<div class="modal-body">
						<div class="form-group" align="center">
							<form enctype="multipart/form-data" method="post" id="udinfo"
							      class="form-horizontal">
								<p style="font-size: large; ">注:删除操作不可恢复,请谨慎!</p>
								<p style="font-size: large; ">系统会自动过滤掉空格,方便管理人员操作</p>
								<p style="font-size: large; ">注:不需要填写选项序号(如"A:"),系统将自动补充</p>
								<div class="form-group">
									<label class="col-sm-3 control-label">问题: </label>
									<div class="col-sm-6">
										<input type="text" name="desc" class="form-control" id="rdesc"
										       placeholder="必填">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项A: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="ra"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio11" class="reffect" name="reffect" checked>
										<label for="radio11">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项B: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="rb"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio22" class="reffect" name="reffect" checked>
										<label for="radio22">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项C: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="rc"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio33" class="reffect" name="reffect" checked>
										<label for="radio33">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项D: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="rd"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio44" class="reffect" name="reffect" checked>
										<label for="radio44">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项E: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="re"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio55" class="reffect" name="reffect" checked>
										<label for="radio55">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项F: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="rf"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio66" class="reffect" name="reffect" checked>
										<label for="radio66">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项G: </label>
									<div class="col-sm-6">
										<input type="text" class="form-control" id="rg"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio77" class="reffect" name="reffect" checked>
										<label for="radio77">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">图片: </label>
									<div class="col-sm-6">
										<input type="file" name="img" class="form-control" id="cimage"
										       placeholder="选填">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">错误提示: </label>
									<div class="col-sm-6">
										<input type="text" name="reason" class="form-control" id="rreason"
										       placeholder="选填">
									</div>
								</div>
							</form>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-primary" style="display: none"></button>
						<button type="button" class="btn btn-danger" id="rdelete">删除</button>
						<button type="button" class="btn btn-default" data-dismiss="modal" id="rcancle">取消
						</button>
						<button type="button" class="btn btn-primary" id="rsure">确定</button>

					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="card-body" style="position:fixed;z-index:99;left: 20%;width: 60%;">
		<div class="modal-active" id="create" style="display: none;">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
						        id="miniclose2"><span
								aria-hidden="true">×</span>
						</button>
						<h4 class="modal-title">新增考题</h4>
					</div>
					<div class="modal-body">
						<div class="form-group" align="center">
							<form enctype="multipart/form-data" method="post" id="createinfo"
							      class="form-horizontal">
								<p style="font-size: large; ">请填写需要增加的考题</p>
								<p style="font-size: large; ">系统会自动过滤掉空格,方便管理人员操作</p>
								<p style="font-size: large; ">注:不需要填写选项序号(如"A:"),系统将自动补充</p>
								<div class="form-group">
									<label class="col-sm-3 control-label">问题: </label>
									<div class="col-sm-6">
										<input type="text" name="desc" class="form-control" id="cdesc"
										       placeholder="必填">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项A: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="ca"
										       placeholder="必填" value="对">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio1" class="ceffect" name="reffect" checked>
										<label for="radio1">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项B: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="cb"
										       placeholder="必填" value="错">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio2" class="ceffect" name="reffect" checked>
										<label for="radio2">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项C: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="cc"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio3" class="ceffect" name="reffect" checked>
										<label for="radio3">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项D: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="cd"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio4" class="ceffect" name="reffect" checked>
										<label for="radio4">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项E: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="ce"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio5" class="ceffect" name="reffect" checked>
										<label for="radio5">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项F: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="cf"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio6" class="ceffect" name="reffect" checked>
										<label for="radio6">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">选项G: </label>
									<div class="col-sm-6">
										<input type="text" name="ident" class="form-control" id="cg"
										       placeholder="必填">
									</div>
									<div class="radio3 radio-check radio-inline">
										<input type="radio" id="radio7" class="ceffect" name="reffect" checked>
										<label for="radio7">
											设为答案
										</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">图片: </label>
									<div class="col-sm-6">
										<input type="file" name="img" class="form-control" id="cimage"
										       placeholder="选填">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">错误提示: </label>
									<div class="col-sm-6">
										<input type="text" name="reason" class="form-control" id="creason"
										       placeholder="选填">
									</div>
								</div>
							</form>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-primary" style="display: none"></button>
						<button type="button" class="btn btn-default" data-dismiss="modal" id="ccancle">取消
						</button>
						<button type="button" class="btn btn-primary" id="csure">确定</button>
					</div>
				</div>
			</div>
		</div>
	</div>
<div class="row" style="text-align: center">
<div class="col-xs-12">
<div class="card">
	<div class="card-header">

		<div class="card-title">
			<div class="title">考题详情</div>
		</div>
		<div class="pull-right card-action">
			<div class="btn-group" role="group">
				<button type="button" class="btn btn-info" id="createstudent"
				        style="font-weight: bold;color: whitesmoke;border-radius: 8px">新增考题
				</button>
			</div>
		</div>
	</div>
<div class="row" style="text-align: center">
<div class="col-xs-12">
<div class="card-body">
<table class="datatable table table-bordered" width="100%">
	<thead>
	<tr>
		<th class="th">编号</th>
		<th class="th">问题</th>
		<th class="th">选项A</th>
		<th class="th">选项B</th>
		<th class="th">选项C</th>
		<th class="th">选项D</th>
		<th class="th">选项E</th>
		<th class="th">选项F</th>
		<th class="th">选项G</th>
		<th class="th">正确答案</th>
		<th class="th">错误提示</th>
		<th class="th">图片</th>
		<th class="th">操作</th>
	</tr>
	</thead>
	<tfoot>
	<tr>
		<th class="th">编号</th>
		<th class="th">问题</th>
		<th class="th">选项A</th>
		<th class="th">选项B</th>
		<th class="th">选项C</th>
		<th class="th">选项D</th>
		<th class="th">选项E</th>
		<th class="th">选项F</th>
		<th class="th">选项G</th>
		<th class="th">正确答案</th>
		<th class="th">错误提示</th>
		<th class="th">图片</th>
		<th class="th">操作</th>
	</tr>
	</tfoot>
<tbody>
{% for i in list %}
<tr>
	<th class="th">{{i.Id}}</th>
	<th class="">{{i.Desc}}</th>
<td class="th" {%if i.Correct== 1%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:1}}</td>
<td class="th" {%if i.Correct== 2%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:2}}</td>
<td class="th" {%if i.Correct== 3%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:3}}</td>
<td class="th" {%if i.Correct== 4%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:4}}</td>
<td class="th" {%if i.Correct== 5%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:5}}</td>
<td class="th" {%if i.Correct== 6%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:6}}</td>
<td class="th" {%if i.Correct== 7%}bgcolor="#faebd7" {%endif%}>{{i.Option|TATA:7}}</td>
<th class="th">{{i.Correct}}</th>
<th class="">{{i.Reason}}</th>
<td width="8%">
		<a onmouseout="document.getElementById('image').style.display='none'"
		onmouseover="showpic('{{i.Image}}')">预览</a>
</td>
<th class="th" width="10%">
		<button onclick="modify(this)" style="width: 80%;border-radius: 10px"
		        class="btn-primary"
		value="{{i.Id}}">修改
</button>
</th>
</tr>
{% endfor %}
</tbody>
</table>

</div>
</div>
	<img id="image" style="display:none;border:dotted 1px green;position: fixed;width: 40%;top: 200px;
                left:30%">

</div>

</div>
</div>
</div>
</div>
</div>
{% endblock %}
